/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.entity;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Nobody
 */
@Entity
@Table(name = "claim", catalog = "DistanceDB", schema = "")
@NamedQueries({@NamedQuery(name = "Claim.findAll", query = "SELECT c FROM Claim c"), @NamedQuery(name = "Claim.findByClaimId", query = "SELECT c FROM Claim c WHERE c.claimId = :claimId"), @NamedQuery(name = "Claim.findByDateTime", query = "SELECT c FROM Claim c WHERE c.dateTime = :dateTime"), @NamedQuery(name = "Claim.findByUserId", query = "SELECT c FROM Claim c WHERE c.userId = :userId")})
public class Claim implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "claimId")
    private Integer claimId;
    @Basic(optional = false)
    @Lob
    @Column(name = "startAddress")
    private String startAddress;
    @Basic(optional = false)
    @Lob
    @Column(name = "startGeoPoint")
    private String startGeoPoint;
    @Basic(optional = false)
    @Lob
    @Column(name = "endAddress")
    private String endAddress;
    @Basic(optional = false)
    @Lob
    @Column(name = "endGeoPoint")
    private String endGeoPoint;
    @Basic(optional = false)
    @Column(name = "dateTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateTime;
    @Basic(optional = false)
    @Lob
    @Column(name = "distance")
    private String distance;
    @Basic(optional = false)
    @Column(name = "userId")
    private int userId;
    @Basic(optional = false)
    @Lob
    @Column(name = "routePoints")
    private String routePoints;

    public Claim() {
    }

    public Claim(Integer claimId) {
        this.claimId = claimId;
    }

    public Claim(Integer claimId, String startAddress, String startGeoPoint, String endAddress, String endGeoPoint, Date dateTime, String distance, int userId, String routePoints) {
        this.claimId = claimId;
        this.startAddress = startAddress;
        this.startGeoPoint = startGeoPoint;
        this.endAddress = endAddress;
        this.endGeoPoint = endGeoPoint;
        this.dateTime = dateTime;
        this.distance = distance;
        this.userId = userId;
        this.routePoints = routePoints;
    }

    public Integer getClaimId() {
        return claimId;
    }

    public void setClaimId(Integer claimId) {
        this.claimId = claimId;
    }

    public String getStartAddress() {
        return startAddress;
    }

    public void setStartAddress(String startAddress) {
        this.startAddress = startAddress;
    }

    public String getStartGeoPoint() {
        return startGeoPoint;
    }

    public void setStartGeoPoint(String startGeoPoint) {
        this.startGeoPoint = startGeoPoint;
    }

    public String getEndAddress() {
        return endAddress;
    }

    public void setEndAddress(String endAddress) {
        this.endAddress = endAddress;
    }

    public String getEndGeoPoint() {
        return endGeoPoint;
    }

    public void setEndGeoPoint(String endGeoPoint) {
        this.endGeoPoint = endGeoPoint;
    }

    public Date getDateTime() {
        return dateTime;
    }

    public void setDateTime(Date dateTime) {
        this.dateTime = dateTime;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getRoutePoints() {
        return routePoints;
    }

    public void setRoutePoints(String routePoints) {
        this.routePoints = routePoints;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (claimId != null ? claimId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Claim)) {
            return false;
        }
        Claim other = (Claim) object;
        if ((this.claimId == null && other.claimId != null) || (this.claimId != null && !this.claimId.equals(other.claimId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.entity.Claim[claimId=" + claimId + "]";
    }

}
